<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		
		<script type="text/javascript">
			
			
			document.write("1-100间的奇数为："+"<br />");
			
			var sum=0;
			for(var i=1;i<=100;i++){
				
				if(i%2!=0){
					document.write(i+"<br />");		
					sum=sum+i;
				}
				
			}
			
			document.write("奇数和为："+sum);
			
		</script>
	</head>
	<body>
	</body>
</html>
